import router from '@/router'
import store from '@/store'
const whiteList = ['/login', '/404']
router.beforeEach((to, from, next) => {
  if (!whiteList.includes(to.path) && store.state.user.token === '') {
    next('/login')
    return
  } else {
    next()
  }
  if (to.path === '/login' && store.state.user.token !== '') {
    // next('/parking/card')
  }
})
